-- GENERATED SPELL FOR [Eclipsion Cavalier] --


function spell0_22018(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(30931,pUnit)
pUnit:RegisterEvent('Sorts_22018', 20289, 1)
end

function spell1_22018(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22018', 628, 1)
end

function spell2_22018(pUnit, Event) --@Summon Eclipsion Hawkstrider,n/a--
pUnit:FullCastSpellOnTarget(38311,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22018', 649, 1)
end

function Sorts_22018(pUnit, Event)
local choix_sorts_22018 = math.random(0, 2)
if choix_sorts_22018 == 0 then
pUnit:RegisterEvent('spell0_22018', 1, 1)
end
if choix_sorts_22018 == 1 then
pUnit:RegisterEvent('spell1_22018', 1, 1)
end
if choix_sorts_22018 == 2 then
pUnit:RegisterEvent('spell2_22018', 1, 1)
end
end

function mob22018_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22018', math.random(1500, 3000), 1)
end

function mob22018_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22018_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22018_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22018, 1, 'mob22018_Action')
RegisterUnitEvent(22018, 2, 'mob22018_Leave')
RegisterUnitEvent(22018, 3, 'mob22018_Kill')
RegisterUnitEvent(22018, 4, 'mob22018_Die')
